function foo(num1, num2) {
  console.log(arguments)
  // 2.1 自己遍历所有元素
  var newArr = []
  for(var i = 0; i < arguments.length; i++) {
    newArr.push(arguments[i] * 10)
  }
  console.log(newArr)

  // 2.2 将arguments转成array
  var newArray2 = Array.prototype.slice.call(arguments)
  console.log(newArray2)
  var newArray3 = [].slice.call(arguments)
  console.log(newArray3)

  // 2.3 ES6语法
  var newArray4 = Array.from(arguments)
  console.log(newArray4)
  var newArray5 = [...arguments]
  console.log(newArray5)

}
foo(1, 2, 3, 4, 5)




// var names = ["aa", "bb", "cc"]
// names.slice
